
<html>

<head>
    <meta charset="UTF-8">
    <title>表字段选择框</title>
    <link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
    <script src="../../ffres/dict/all.js"></script>
    <a href="" target="_blank" id="commonLink" name="commonLink"></a>
    
</head>

<body class="easyui-layout">
    <div class="easyui-layout" title="" style="width:100%;height:100%;padding:0px;">
        <div data-options="region:'center',split:false" title="" style="width:25%;">
            <table id="dg" class="easyui-datagrid" title="" style="width:100%;height:100%"
                    data-options="singleSelect:false,collapsible:true,url:'../../api/model/table/fields?objectId=' + $.getUrlParam('objectId'),method:'post'"
                    toolbar="#tb"
                title="Load Data" 
                rownumbers="true" pagination="true" pageSize="20">
                <thead>
                    <tr>
                        <th data-options="field:'fieldCode',resizable:true" width="15%">字段代码</th>
                        <th data-options="field:'fieldName',resizable:true" width="15%">字段名称</th>
                        <th data-options="field:'fieldOrder',resizable:true" hidden="true">字段排序</th>
                        <th data-options="field:'fieldType',resizable:true" align:'center'" width="10%" align="center">字段类型</th>
                        <th data-options="field:'fieldLength',resizable:true" width="8%" align="center">字段长度</th>
                        <th data-options="field:'fieldPrecision',resizable:true" width="8%" align="center">字段精度</th>
                        <th data-options="field:'fieldOption',resizable:true" width="13%" align="center">字段选项</th>
                        <th data-options="field:'isPk',resizable:true" formatter="formatter_STD_PUB_YN" width="5%" align="center">主键</th>
                        <th data-options="field:'isAllowNull',resizable:true" formatter="formatter_STD_PUB_YN" width="5%" align="center">允空</th>
                        <th data-options="field:'defValue',resizable:true" hidden="true">默认值</th>
                        <th data-options="field:'fieldDesc',resizable:true" width="20%">字段描述</th>

                    </tr>
                </thead>
            </table>
        </div>
        <div data-options="region:'south',split:false" style="height:30px;text-align:center;padding:0px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="doSelect()">选择返回</a>&nbsp;
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
        </div>
    </div>

    <script>
    

        function doSelect() {
            var selection = $('#dg').datagrid('getSelections');
            if (selection) {
                var callback = $.getUrlParam('callback');
                if (callback && window.parent[callback]) {
                    window.parent[callback].call(window.parent, selection);
                }
                window.parent.JLEUtil.closewin();
            } else {
                $.messager.alert('提示', '请选择一条记录！');
            }
        }

        function closeForm() {
            window.parent.JLEUtil.closewin();
        }
    </script>
</body>

</html>